import Vue from 'vue'
import App from './App'
import common from './common/common.js'
import util from './common/util/util.js'

Vue.prototype.$util = util;
Vue.prototype.$common = common;
Vue.prototype.$store = store;

Vue.config.productionTip = false

App.mpType = 'app'

// main.js
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

import store from '@/store'
// 引入uView提供的对vuex的简写法文件
let vuexStore = require('@/store/$u.mixin.js')
Vue.mixin(vuexStore)

//全局分享
import share from '@/static/js/share.js'
Vue.mixin(share)

import validate from '@/common/validate.js'
// 挂载到全局
Vue.prototype.$validate = validate

// 输入框模糊搜索
// import inputSearch from '@/components/p-inputSearch/inputSearch.vue'
// Vue.component('inputSearch', inputSearch)

const app = new Vue({
	store,
	...App
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
require('@/common/http.interceptor.js')(app)


app.$mount()
